package com.mz.mattress.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mz.mattress.admin.api.req.SaleListReq;
import com.mz.mattress.admin.api.req.SaleQueryReq;
import com.mz.mattress.admin.api.resp.SaleSum;
import com.mz.mattress.api.common.Result;
import com.mz.mattress.api.entity.Device;
import com.mz.mattress.api.entity.Merchant;
import com.mz.mattress.api.entity.Sale;

import java.util.List;
import java.util.Set;

public interface SaleService {

    /**
     * @param req
     * @return
     */
    Result<IPage<Sale>> listPage(SaleQueryReq req);

    Result<Sale> getById(Integer id);

    Result add(Sale sale);

    Result updateById(Sale sale);

    Result updateMobile(Integer id, String mobile);

    Result deleteByIds(Set<Integer> ids);

    //销售员首页统计
    Result<SaleSum> headSum(Integer id);

    Result<List<Sale>> searchByMobile(String mobile);

    Result<IPage<Merchant>> merchantPage(SaleListReq req);

    Result<IPage<Sale>> salePage(SaleListReq req);

    Result<IPage<Device>> devicePage(Integer id, Integer status, Integer pageNo, Integer pageSize);

    /**
     * 统计
     */
    void doSum();


    /**
     * 销售员是否存在
     *
     * @param mobile
     * @return
     */
//    Result isExist(String mobile);
}
